﻿using QuanLyGiaoVuDAL.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QuanLyGiaoVuUI.Extensions.Utilities
{
    public static class UserUtility
    {
        public static NguoiDungDTO GetCurrentUser()
        {
            var session = HttpContext.Current.Session;
            NguoiDungDTO myInfo = new NguoiDungDTO();
            if (session["UserInfo"] != null)
            {
                myInfo = (NguoiDungDTO)session["UserInfo"];
            }
            else
                myInfo = null;
            return myInfo;
        }
    }
}